package com.shuai.orderfood.merchants.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 商家用户实体类
 */
@Data
@TableName("merchants_users")
public class MerchantsUser {

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    @TableField("username")
    private String username;

    @TableField("password")
    private String password;

    @TableField("phone")
    private String phone;

    @TableField("role_id")
    private Integer roleId;

    // 虚拟字段：是否超级管理员（通过数据库计算字段获取）
    @TableField(value = "is_super")
    private Boolean isSuper;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}